1. Field of the Invention
The present invention relates to editing apparatuses, editing methods and programs, and in particular, it relates to an editing apparatus, an editing method and a program, which enable insertion editing of variable-length encoded data with certainty.
2. Description of the Related Art
Recently, in existing video tape recorders (VTRs), insertion editing technologies, which enable insertion of edit data onto a predetermined range including data that is already recorded in video tapes (hereinafter, the data that is already recorded will be called base data), have been generally and widely used (for example, refer to International Publication Pamphlet No. WO99/22374).
Further, in addition thereto, in editing systems allowing editing of data recorded in recording media, which is variable-length encoded by using a moving picture experts group phase (MPEG) method supporting the Long-GOP structure, insertion editing functions using technologies just like the existing ones have been desired.
FIGS. 1A and 1B are diagrams used for explanation of an insertion editing method in the case where base data and edit data are fixed-length encoded data.
In an example shown in FIGS. 1A and 1B, base data and edit data are each recorded iteratively for each frame of annual ring data including three kinds of data aligned within a period of time of two seconds, a first one being proxy data (PROXY) or real-time meta data (RT), a second one being audio data (AUDIO), a third one being video data (VIDEO). In addition, the proxy data is proxy data obtained by downsizing the video data, and the real-time meta data is meta data having contents therein, for which, when read-out processing thereon is performed, the real-time characteristics of the read-out processing is to be ensured.
As shown in FIG. 1A, if base data is fixed-length encoded data, each block of data forming a frame of annual ring data has a fixed length. Further, if edit data is fixed-length encoded data, a data amount of base data within a predetermined period of time while reproduction thereof is performed is the same as a data amount of edit data within the same predetermined period of time while reproduction thereof is performed. Accordingly, for example, as shown in FIG. 1B, it is possible to perform insertion editing by replacing video data included in base data within a predetermined period of time while reproduction of the base data is performed, by video data included in edit data within the same predetermined period of time while reproduction of the edit data is performed.
In contrast, an insertion editing performed in the case where video data included in base data and video data included in edit data are variable-length encoded data will be hereinafter described with reference to FIGS. 2A and 2B.
As shown in FIGS. 2A and 2B, if video data included in base data and video data included in edit data are variable-length encoded data, a total generated code amount of video data included in base data within a predetermined period of time while reproduction of the base data is performed, as well as a total generated code amount of video data included in edit data within the same predetermined period of time while reproduction of the edit data is performed, is variable. Therefore, the total generated code amount of video data included in edit data within a predetermined period of time while reproduction of the edit data is performed is likely to be larger than the total generated code amount of video data included in base data within the same predetermined period of time while reproduction of the base data is performed. In such a case, performing overwriting of video data, which is included in edit data within a predetermined period of time, on video data, which is included in base data within the same predetermined period of time, is difficult, and thus, makes it difficult to perform insertion editing.
Accordingly, as shown in FIG. 3, a method, which enables base data and edit data to be variable-length encoded so that a total generated code amount of an ES for base data and a total generated code amount of an ES for edit data can be the same, has been considered.
However, recording units of data to be recorded into recording media have fixed lengths, and such a recording unit is determined in advance in accordance with a file format in which data is recorded.
For example, a file format in accordance with the material exchange format (MXF) is configured to include a header, a body and a footer, which are serially allocated from the beginning thereof. The body is configured by items each forming one frame.
More specifically, as shown in FIG. 4, the body is configured to have three kinds of items, a first one being a system item including meta data allocated therein, which is associated with a frame of video data allocated in a picture item subsequent to the system item itself, a second one being a picture item including a frame of video data allocated therein, which is encoded by using an MPEG method supporting the Long-GOP structure, a third one being an audio item including a frame of audio data allocated therein, which is encoded by using a method conforming to the audio engineering society (AES) 3 standard.
Further, as shown in FIG. 4, in each of the items, data is KLV (Key, Length, and Value) coded, and is allocated so as to form a KLV structure.
The KLV structure is a data structure, in which, from the beginning thereof, Key, Length and Value are serially allocated. Key has a label of 16 bytes allocated therein, which conforms to the standard SMPTE 298M, and represents a kind of a block of data included in Value. Length has a data length of the block of data included in Value. Value has a block of real data allocated therein.
Further, each of the items has a fixed data-length based on the KLV alignment grid (KAG). Further, a filler (“FILL” shown in FIG. 4), which allows each of the items to have a fixed data-length, is also configured to form the KLV structure, and is allocated so as to follow a data portion of each of the items.
As described above, in the MXF, data is recorded individually for each of recording units corresponding to respective fixed data-lengths of the three kinds of items. The recording unit corresponding to the picture item is, for example, 2 Kbytes.